home *** CD-ROM | disk | FTP | other *** search
/ Large Pack of OldSkool DOS MOD Trackers / package_16-january-2001.zip / Effects / cheapo do-nothing.cpp < prev    next >
C/C++ Source or Header  |  2000-08-13  |  2KB  |  112 lines

  1. // Copyright (C) Mikko Apo (apo@iki.fi)
  2. // The following code may be used to write free software
  3. // if credit is given to the original author.
  4. // Using it for anything else is not allowed without permission
  5. // from the author.
  6.  
  7. #include <stdlib.h>
  8. #include <time.h>
  9. #include <math.h>
  10. #include <string.h>
  11. #include "../mdk.h"
  12.  
  13. #define COMMAND_STRING "About..."
  14. #define MACHINE_NAME "cheapo do-nothing"
  15. #define SHORT_NAME "do-nothing"
  16. #define MACHINE_AUTHOR "Mikko Apo (apo@iki.fi)"
  17. #define MAX_TRACKS        0
  18. #define MIN_TRACKS        0
  19. #define NUMGLOBALPARAMETERS 0
  20. #define NUMTRACKPARAMETERS 0
  21. #define NUMATTRIBUTES 0
  22. #define __VERSION__ "1.0"
  23.  
  24. // Machine's info
  25.  
  26. CMachineInfo const MacInfo = 
  27. {
  28.     MT_EFFECT,MI_VERSION,MIF_DOES_INPUT_MIXING,MIN_TRACKS,MAX_TRACKS,
  29.     NUMGLOBALPARAMETERS,NUMTRACKPARAMETERS,NULL,NUMATTRIBUTES,NULL,
  30. #ifdef _DEBUG
  31.     MACHINE_NAME" [DEBUG]"
  32. #else
  33.     MACHINE_NAME
  34. #endif
  35.     ,SHORT_NAME,MACHINE_AUTHOR,COMMAND_STRING
  36. };
  37.  
  38.  
  39. class miex : public CMDKMachineInterfaceEx
  40. {
  41.  
  42. };
  43.  
  44. class mi : public CMDKMachineInterface
  45. {
  46. public:
  47.     mi();
  48.  
  49.     virtual void Command(int const i);
  50. //    virtual void Tick();
  51. //    virtual char const *DescribeValue(int const param, int const value);
  52.  
  53.     virtual void MDKInit(CMachineDataInput * const pi);
  54.     virtual bool MDKWork(float *psamples, int numsamples, int const mode);
  55.     virtual bool MDKWorkStereo(float *psamples, int numsamples, int const mode);
  56.     virtual void MDKSave(CMachineDataOutput * const po) { }
  57.  
  58.     public:
  59.     virtual CMDKMachineInterfaceEx *GetEx() { return &ex; }
  60.     virtual void OutputModeChanged(bool stereo) {};
  61.  
  62.     public:
  63.     miex ex;
  64.  
  65. private:
  66.  
  67. };
  68.  
  69.  
  70. DLL_EXPORTS
  71.  
  72. mi::mi()
  73. {
  74. }
  75.  
  76. void mi::Command(int const i)
  77. {
  78.     static char txt[500];
  79.     switch(i)
  80.     {
  81.     case 0:
  82.         pCB->MessageBox(MACHINE_NAME"\n\nBuild date: "__DATE__"\nVersion: "__VERSION__"\nCoded by: "MACHINE_AUTHOR"\n\nCheck out http://www.iki.fi/apo/buzz/\nfor more buzz stuff.\n\nExcellent skin made by Hymax.");
  83.         break;
  84.     }
  85.  
  86. }
  87.  
  88.  
  89. void mi::MDKInit(CMachineDataInput * const pi)
  90. {
  91. }
  92.  
  93. bool mi::MDKWorkStereo(float *psamples, int numsamples, int const mode)
  94. {
  95.     if ((mode==WM_WRITE)||(mode==WM_NOIO))
  96.     {
  97.         return false;
  98.     }
  99.  
  100.     return true;
  101. }
  102.  
  103. bool mi::MDKWork(float *psamples, int numsamples, int const mode)
  104. {
  105.     if ((mode==WM_WRITE)||(mode==WM_NOIO))
  106.     {
  107.         return false;
  108.     }
  109.  
  110.     return true;
  111. }
  112.